<html xmlns:th="http://www.thymeleaf.org"
  th:replace="~{fragments/layout :: layout (~{::body},'patients')}">

<body>

  <h2>Patient</h2>
  <form th:object="${patient}" class="form-horizontal" id="add-owner-form" method="post">
    <div class="form-group has-feedback">
      <input
        th:replace="~{fragments/inputField :: input ('First Name', 'firstName', 'text')}" />
      <input
        th:replace="~{fragments/inputField :: input ('Last Name', 'lastName', 'text')}" />
      <input
        th:replace="~{fragments/inputField :: input ('Address', 'address', 'text')}" />
      <input
        th:replace="~{fragments/inputField :: input ('Phone Number', 'phoneNumber', 'text')}" />
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button
          th:with="text=${patient['new']} ? 'Add Patient' : 'Update Patient'"
          class="btn btn-default" type="submit" th:text="${text}">Add
          Patient</button>
      </div>
    </div>
  </form>
</body>
</html>
